<? include 'server_config.php'; 


if($user_idx=="")
{
	
	?>
	<script>
		alert("!");
	</script>
	<?
	return;
}

?>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<?





$sql = "



INSERT INTO `ndd_test` (
`user_idx` ,
`disease_idx` ,
`list_test_idx` ,
`reg_date` ,
`desc` ,
`no_desc`
)
VALUES (
'$user_idx',  '0',  '$t_type',  '$t_date',  '$t_desc',  '$t_no_desc'
);

";

//echo $sql;
$result = mysql_query($sql,$connect);


$sql = "
SELECT name FROM ndd_list_test WHERE list_test_idx = $t_type LIMIT 1;
";

$result = mysql_query($sql,$connect);
$row = mysql_fetch_row($result);

$test_name = $row[0];

$sql = "


INSERT INTO  `ndd_cure` (
`user_idx` ,
`disease_idx` ,
`description` ,
`description_type` ,
`reg_timestamp`
)
VALUES (
 '$user_idx',  '0',  '".$test_name."(을)를 하였습니다.',  '20', 
CURRENT_TIMESTAMP
);
";

$result = mysql_query($sql,$connect);


?>

<script> 
//alert('<?=$t_desc?>');
//parent.location.reload();
</script>











